package main

import (
	"fmt"
	"myinterface"

	"github.com/kataras/iris"
	"github.com/kataras/iris/sessions"
	pg "gopkg.in/pg.v5"
)

type DataT1 struct {
	//So     string
	Rooms  []string
	Prefix string
	Desc   string
	Level  int
}

type ResType int

func New(app *iris.Application, sesns *sessions.Sessions, db *pg.DB, conf map[string]interface{}) interface{} {
	var d1 = new(DataT1)
	err := myinterface.MapToStruct(conf, d1)
	fmt.Printf("%#v\n%v\n", d1, err)
	var o ResType = 1
	return &o
}

func (obj *ResType) Run() error {
	fmt.Printf("\nRun cfgx plugin.\n")
	return nil
}
